package com.example.demo.demos.web.mapper;

import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Usermapper {
    @Select("select * from user")
    List<User> getAllUser();

    @Insert("insert into user(id,name,password) value(#{name},#{password}")
    String addUser(User user);
    @Update(("update user set id=#{id},name=#{name},password=#{password}"))
    void updateUser(User user);

    @Delete("delete * from user")
    String deleteUser();
    @Select("select * from user where id=#{id}")
    User getUserById(int id);
    @Delete("delete from user where id=#{id}")
    void deleteUserById(int id);


    void updateUser();

    void addUser();
}
